Skip to content

Validation and verification

![Alt text](../7.4 Standard methods of solution/image.png)

Validation and verification

  • In order for computer systems to only accept data inputs that are reasonable and accurate, every item of data needs to be examined before it is accepted by the system.

  • Two different methods, with very similar sounding names, are used.

  • For data entry, validation ensures that only data that is reasonable is accepted.

  • Verification is used to check that the data does not change as it is being entered.

Validation

  • Validation is the automated checking by a program that data is reasonable before it is accepted into a computer system.
  • When data is validated by a computer system, if the data is rejected a message should be output explaining why the data was rejected and another opportunity given to enter the data.
  • There are many different types of validation checks including:
    • range checks
    • length checks
    • type checks
    • presence checks
    • format checks
    • check digits

Range check

  • A range check checks that the value of a number is between an upper value and a lower value.
  • For example, checking that percentage marks are between 0 and 100 inclusive

Alt text

Length check

  • A length check checks either that data contains an exact number of characters, for example that a password must be exactly eight characters in length so that passwords with seven or fewer characters or nine or more characters would be rejected

Alt text

Type check

  • A type check checks that the data entered is of a given data type, for example, that the number of brothers or sisters would be an integer (whole number).

Alt text

Presence check

  • A presence check checks to ensure that some data has been entered and the value has not been left blank, for example, an email address for an online transaction must be completed.

Alt text

Format check

  • A format check checks that the characters entered conform to a pre-defined pattern, for example, in Chapter 9 the cub number must be in the form CUB9999 and Gender must be in the form ‘M’ or ‘F’.

Alt text

Check digit

  • A check digit is the final digit included in a code; it is calculated from all the other digits in the code. Check digits are used for barcodes, product codes, International Standard Book Numbers (ISBN) and Vehicle Identification Numbers (VIN).

Alt text

Verification

  • Verification is checking that data has been accurately copied from one source to another – for instance, input into a computer or transferred from one part of a computer system to another.

  • Verification methods for input data include:

    • Double entry
    • Screen/visual check

Alt text

Double entry

  • For double entry the data is entered twice, sometimes by different operators.
  • The computer system compares both entries and if they are different outputs an error message requesting that the data is entered again.

Screen/visual check

  • A screen/visual check is a manual check completed by the user who is entering the data.
  • When the data entry is complete the data is displayed on the screen and the user is asked to confirm that it is correct before continuing.
  • The user either checks the data on the screen against a paper document that is being used as an input form or, confirms whether it is correct from their own knowledge.